package com.anycl.spring.aop;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

import java.util.ArrayList;
import java.util.List;

@Configuration
@ComponentScan
@EnableAspectJAutoProxy

public class AopConfig {
    @Bean
    public Audience audience() {
        return new Audience();
    }

    @Bean
    public TrackCounter trackCounter() {
        return new TrackCounter();
    }

    @Bean
    public Blue blueCD() {
        Blue blue = new Blue();
        blue.setTitle("Blue");
        blue.setArtist("Alex Hope");
        List<String> list = new ArrayList<>();
        list.add("Love it's hard, I know");
        list.add("All your lights are red, but I'm green to go");
        list.add("Used to see you high, now you're only low");
        list.add("All your lights are red, but I'm green to go");
        blue.setTracks(list);
        return blue;
    }
}
